package com.example.demo.ddd;

/**
 * @author lzz
 * @package com.example.zuul.templete
 * @create 2019-05-20 10:00
 * @description: ${DESCRIPTION}
 */
public class DataResult {

    private Integer code;
    private String msg;
    private String token;
    private Object data;

    public DataResult(){
    }

    public void setStatusCode(StatusCode statusCode){
        this.msg = statusCode.getMsg();
        this.code = statusCode.getCode();
    }

    public DataResult(StatusCode code, String token){
        this.code=code.getCode();
        this.msg=code.getMsg();
        this.token=token;
    }

    public DataResult(StatusCode code){
        this.code=code.getCode();
        this.msg=code.getMsg();
        this.token=null;
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }


    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
